package com.dmx.cep.service.impl;

import java.util.List;

import com.dmx.cep.dao.UserBaseInfoDao;
import com.dmx.cep.dao.UserInfoDao;
import com.dmx.cep.dao.UserSnsDao;
import com.dmx.cep.entity.UserBaseInfo;
import com.dmx.cep.entity.UserInfo;
import com.dmx.cep.entity.UserSns;
import com.dmx.cep.service.UserManageService;
import com.dmx.fw.service.impl.BaseServiceImpl;

public class UserManageServiceImpl extends BaseServiceImpl implements UserManageService {

	@Override
	public void batchDeleteUserBaseInfoByIds(String[] ids) {
		// TODO Auto-generated method stub
		userBaseInfoDao.batchDeleteUserBaseInfoByIds(ids);
		
	}

	@Override
	public void deleteUserBaseInfoById(String id) {
		// TODO Auto-generated method stub
		userBaseInfoDao.deleteUserBaseInfoById(id);
	}

	@Override
	public UserBaseInfo findUserBaseInfoById(String id) {
		// TODO Auto-generated method stub
		
		return userBaseInfoDao.findUserBaseInfoById(id);
	}

	@Override
	public void saveOrUpdateUserBaseInfo(UserBaseInfo userBaseInfo) {
		// TODO Auto-generated method stub
		if(userBaseInfo!=null){
			userBaseInfo.setAreaCd(0);
			userBaseInfo.setJobCd(0);
			userBaseInfo.setSafecode("0");
		}
		userBaseInfoDao.saveOrUpdateUserBaseInfo(userBaseInfo);
		
	}
	


	@Override
	public void batchDeleteUserInfoByIds(String[] ids) {
		// TODO Auto-generated method stub
		userInfoDao.batchDeleteUserInfoByIds(ids);
	}

	@Override
	public void deleteUserInfoById(String id) {
		// TODO Auto-generated method stub
		userInfoDao.deleteUserInfoById(id);
	}

	@Override
	public UserInfo findUserInfoById(String id) {
		// TODO Auto-generated method stub
		return userInfoDao.findUserInfoById(id);
	}

	@Override
	public void saveOrUpdateUserInfo(UserInfo userInfo) {
		// TODO Auto-generated method stub
		userInfoDao.saveOrUpdateUserInfo(userInfo);
		
	}
	
	@Override
	public List<UserSns> findUserSnsesByUid(String uid) {
		// TODO Auto-generated method stub
		return userSnsDao.findUserSnsesByUid(uid);
	}
	
	
	public void setUserBaseInfoDao(UserBaseInfoDao userBaseInfoDao) {
		this.userBaseInfoDao = userBaseInfoDao;
	}

	public void setUserInfoDao(UserInfoDao userInfoDao) {
		this.userInfoDao = userInfoDao;
	}

	public void setUserSnsDao(UserSnsDao userSnsDao) {
		this.userSnsDao = userSnsDao;
	}


	private UserBaseInfoDao userBaseInfoDao;
	
	private UserInfoDao userInfoDao;
	
	private UserSnsDao userSnsDao;


	

}
